
#ifndef __PENDING_DB_H
#define __PENDING_DB_H

#include <vector>
#include "SQLiteDB.h"

// handle char(64)
// keydata char(4096)

/** A database of actions that are pending approval via the
 * administration console. */
class PendingDB : public SQLiteDB
{
   public:
      PendingDB(const char *filename) : SQLiteDB(filename, 1) { createTablesIfNecessary(); }
      ~PendingDB() {}
      std::vector<char *> *getAllPendingHostKeyUpdates();
      void removePendingHostKeyUpdate(const char *hostname);
      void addNewHostKeyUpdateRequest(const char *hostname, const char *oldkeyfingerprint, const char *newkeyfingerprint);
      void createTablesIfNecessary();
};

#endif
